



//
//  NTongjiViewController.m
//  nncloud
//
//  Created by macfai on 2018/11/23.
//  Copyright © 2018 macfai. All rights reserved.
//

#import "NTongjiViewController.h"
#import "NMineCell.h"
#import "NBigDataApplyCommontVC.h"
@interface NTongjiViewController ()<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic,strong)UITableView *tableView;

@property (nonatomic,strong)NSMutableArray *dataArray;

@property (nonatomic,strong)NSArray *titleArray;

@end

@implementation NTongjiViewController


#define cellIdentifier  @"mineid"
#define HeaderHight  290
#define PageSize 20

-(UITableView *)tableView{
    
    if (!_tableView) {
        
        WeakStament(ws);
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0 , 0, ScreenWidth , ScreenHeight - 64) style:UITableViewStylePlain];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.rowHeight = 80.f;
        //        _tableView.separatorColor = [UIColor clearColor];
        _tableView.backgroundColor = kBackgroundColor;
        [_tableView registerNib:[UINib nibWithNibName:@"NMineCell" bundle:nil] forCellReuseIdentifier:cellIdentifier];
        //        _tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
        //            [ws loadData];
        //        }];
        //        _tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
        //            [ws loadMoreData];
        //        }];
        _tableView.showsVerticalScrollIndicator = NO;
        _tableView.tableFooterView = [UIView new];
        
    }
    return _tableView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = kWhiteColor;
    [self.navigationItem setItemWithTitle:@"统计分析" textColor:kNavigationTitleColor fontSize:18 itemType:center];
   
    self.dataArray = [NSMutableArray array];
    [self.view addSubview:self.tableView];
    self.titleArray = @[@"工业运行走势图",@"全市重点工业品情况",@"重点企业预警图",@"工业经济运行动态",@"重点企业信息",@"区县得分排名",@"企业得分排名",];
//    [self loadData];
    // Do any additional setup after loading the view from its nib.
}



#pragma mark - delegate datasource

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    

    
    NBigDataApplyCommontVC *data = [NBigDataApplyCommontVC new];
    data.hidesBottomBarWhenPushed = YES;
    
    
    ///统计分析
    switch (indexPath.row) {
        case 0:
        {
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/industrialStatistics.html";
            
        }
            break;
        case 1:
        {
            
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/industrialSituation.html";
            
        }
            break;
        case 2:
        {
            
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/companyWarn.html";
            
        }
            break;
        case 3:
        {
            
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/industrialEconomyDynamics.html";
            
        }
            break;
        case 4:
        {
            
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/keyEnterprises.html";
            
        }
            break;
        case 5:
        {
            
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/districtRank.html";
            
        }
            break;
        case 6:
        {
            
            data.url = @"http://172.16.0.181/statisticalAnalysis/html/corporateScoreRanking.html";
            
        }
            break;
            
            
        default:
            break;
            
    }
    
    [self.navigationController pushViewController:data animated:YES];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.titleArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    NMineCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
    cell.nameLabel.text = self.titleArray[indexPath.row];
    cell.LogoImage.image = WDImgName(self.titleArray[indexPath.row]);
    return cell;
}

@end
